package com.qfedu.service.impl;

import com.qfedu.mapper.UserMapper;
import com.qfedu.service.UserService;
import com.qfedu.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author LiJH
 * @date 2023-01-31
 */
@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public void addUser(User user) {
        this.userMapper.addUser(user);
    }

    @Override
    public List<User> listUser() {
        return userMapper.listUser();
    }

    @Override
    public void deleteUser(int id) {
        this.userMapper.deleteUser(id);
    }

    @Override
    public void updateUser(User user) {
        this.userMapper.updateUser(user);
    }


}